--- a/configure
+++ b/configure
@@ -13143,7 +13143,7 @@
     ac_res="none required"
   else
     ac_res=-l$ac_lib
-    LIBS="-l$ac_lib -ltinfo $ac_func_search_save_LIBS"
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
   if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_search_readline=$ac_res
@@ -13171,7 +13171,7 @@
 
 $as_echo "#define HAVE_EDITLINE 1" >>confdefs.h
 
-      READLINE_LIBS="$LIBS -ltinfo"
+      READLINE_LIBS="$LIBS "
       enable_readline=no
 
 fi
